from datetime import datetime
from pydantic import BaseModel, Field


class LoginInSchema(BaseModel):
    code: str


class ClientInSchema(BaseModel):
    # create_time: datetime = Field(default=datetime.now())
    openid: str
    phone: str | None = Field(None)
    nickname: str | None = Field(None)


class ClientOutSchema(BaseModel):
    id: int
    create_time: datetime
    openid: str
    phone: str | None = None
    nickname: str | None = None
